package cn.edu.hunau.utils;

import cn.edu.hunau.dao.BackstageDao;
import cn.edu.hunau.dao.impl.BackstageDaoImpl;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author 苏佳
 * @Date 2023 01 04 11 43
 **/
public class OrderResultUtils {
    public static Map<String,Integer> orderResultByMonth(int month){
        BackstageDao backstageIndexDao = new BackstageDaoImpl();
        Map<String, Integer> map = new HashMap<>();
        int ostate1 = backstageIndexDao.countOrderByMouthAndOstate(month, 1);
        int ostate2 = backstageIndexDao.countOrderByMouthAndOstate(month, 2);
        int ostate3 = backstageIndexDao.countOrderByMouthAndOstate(month, 3);
        int ostate4 = backstageIndexDao.countOrderByMouthAndOstate(month, 4);
        map.put("ostate1",ostate1);
        map.put("ostate2",ostate2);
        map.put("ostate3",ostate3);
        map.put("ostate4",ostate4);
        return map;
    }

}
